feat(runtime): add agent_type + agent_framework fields to UiPathRuntimeFactorySettings#141
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a backwards-compatible way for consumers to retrieve both the resolved runtime factory and the framework name it was registered under, enabling telemetry/governance labeling without separate framework-detection logic.
Changes:
- Introduces
SelectedFactoryandUiPathRuntimeFactoryRegistry.get_selection()to return(factory, framework)using the same resolution rules asget(). - Keeps
UiPathRuntimeFactoryRegistry.get()signature/return type unchanged by delegating toget_selection().factory. - Exports
SelectedFactory, adds branch-coverage tests forget_selection, and bumps version to0.11.7.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/uipath/runtime/registry.py |
Adds SelectedFactory and get_selection(), and refactors get() to delegate while preserving behavior. |
src/uipath/runtime/__init__.py |
Re-exports SelectedFactory as part of the public runtime package API. |
tests/test_registry.py |
Adds direct unit tests for get_selection() branches and confirms get() BC delegation. |
pyproject.toml |
Bumps project version to 0.11.7. |
uv.lock |
Updates lockfile entry for uipath-runtime to 0.11.7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
46b1c1b to
75a057c
Compare
75a057c to
cf3638a
Compare
CI's ``ruff format --check .`` flagged trailing whitespace on the blank line between the ``agent_type`` and ``agent_framework`` fields. Autoformat trim only — no behavioral change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
cristipufu
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds two optional string fields to
UiPathRuntimeFactorySettingsso framework adapters can carry their own identity (agent type + framework name) through the factory-settings surface. Downstream consumers that need those labels — governance audit events, tracing spans, telemetry envelopes — can read them offsettingsinstead of sniffing the filesystem forlanggraph.json/llama_index.json/ etc.Both fields default to
Noneso every existing adapter and consumer keeps working unchanged. Adapters that want the labels populate them at registration time (e.g.agent_framework="langgraph") and the host reads them back through the factory registry lookup.Scope
3 files changed, +6/-2
src/uipath/runtime/factory.pystr | None = Nonefields onUiPathRuntimeFactorySettingspyproject.toml0.11.6→0.11.7uv.lockBackward compatibility
Additive only — both fields have a
Nonedefault:settings.agent_type/settings.agent_frameworkmust handleNoneTest plan
uv run pytest— full suite green locallyuv run ruff check ./uv run ruff format --check .— cleanuv run mypy --config-file pyproject.toml .— cleanFollow-ups (separate PRs, not in this one)
uipath-langchain,uipath-llamaindex,uipath-openai-agents, etc.) will populateagent_frameworkon their factory registration in follow-up commits in their own repos_governance_bootstrap.pycan drop its filesystem-sniffingdetect_agent_frameworkonce at least one adapter ships the label; until then it keeps working as a fallbackDevelopment Package
🤖 Generated with Claude Code